
var es6 = require('./menu/es6')
var html = require('./menu/html')
var js = require('./menu/js')
var api = require('./menu/webapi')
var getFiles = require('./tool')

var css = getFiles('css')
var node =getFiles('node')

var external = "http://39.108.145.64/markdown?type="

module.exports = {
    title: 'Hello everyone',
    description: 'Hi, my friend!',
    head: [
        ['link', {
            rel: 'icon',
            href: `/favicon.ico`
        }]
    ],
    port: 8081,
    dest: './dist',
    ga: '',
    evergreen: true,
    themeConfig: {
        logo: '/logo.png',
        nav: [
            { text: 'Home', link: '/' },
            { text: 'Guide', link: '/html/' },
            { text: 'es6', link: '/es6/' },
            {
                text: 'tutorial',
                items: [
                    { text: '前端', items: [{ text: 'Html', link: '/html/' }, { text: 'Css', link: '/css/' }, { text: 'Javascript', link: '/js/' },{ text: 'web-api', link: '/webapi/' }] },
                    { text: 'Nodejs', items: [{ text: 'node', link: '/node/'}] } //{ text: 'nodejs', link: 'https://google.com', target: '_self', rel: '' }
                ]
            },
            { text: 'External', items: [{ text: 'python3',  link: external+'python', target: '_self'},{ text: 'interview',  link: external+'interview', target: '_self'}] },
        ],
        sidebarDepth: 1,
        sidebar: {
            '/guide/':
                [''],
            '/es6/':es6,
            '/html/': html,
             '/js/':js,
             '/webapi/':api,
             '/css/':['',...css],
             '/node/':['',...node]

        }
    }
}